home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
223_01
/
strrchr.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1980-01-01
|
512 b
|
17 lines
/*
** strrchr(s,c) - Search s for rightmost occurrance of c.
** s = Pointer to string to be searched.
** c = Character to search for.
** Returns pointer to rightmost c or NULL.
*/
static char *ptr;
strrchr(s, c) char *s, c; {
ptr = 0;
while(*s) {
if(*s==c) ptr = s;
++s;
}
return (ptr);
}